//
//  DataController.h
//  SHWT
//
//  Created by Rui on 14/10/23.
//  Copyright (c) 2014年 xingheng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Helpers.h"
#import <AFNetworking.h>

@interface DataController : NSObject

/**
 *  用户登陆
 *
 *  @param telNum    手机号/用户名
 *  @param password  登录密码
 *  @param loginType 登录类型
 *  @param imei      设备号
 *  @param success   成功回调
 */
+ (void)userLogin:(NSString *)telNum
         password:(NSString *)password
        loginType:(NSString *)loginType
             imei:(NSString *)imei
        withBlock:(void(^)(NSDictionary *result))success;

/**
 *  重置密码
 *
 *  @param loginName        登录账号
 *  @param telNum           手机号/用户名
 *  @param verificationCode 验证码
 *  @param newPassword      新密码
 *  @param userType         用户类型
 *  @param success          成功回调
 */
+ (void)resetPassword:(NSString *)loginName
               telNum:(NSString *)telNum
     verificationCode:(NSString *)verificationCode
          newPassword:(NSString *)newPassword
             userType:(NSString *)userType
            withBlock:(void(^)(NSDictionary *result))success;

/**
 *  获取司机当前货单信息
 *
 *  @param driverId 司机id
 *  @param userId   用户id
 *  @param imei     设备号
 *  @param success  成功回调
 */
+ (void)getDriverCurOrder:(NSNumber *)driverId
                   userId:(NSNumber *)userId
                     imei:(NSString *)imei
                withBlock:(void(^)(NSDictionary *result))success;


/**
 *  获取司机历史货单列表信息
 *
 *  @param driverId 司机id
 *  @param userId   用户id
 *  @param lastId   最小id
 *  @param imei     设备号
 *  @param success  成功回调
 */
+ (void)getDriverHisOrder:(NSNumber *)driverId
                   userId:(NSNumber *)userId
                   lastId:(NSNumber *)lastId
                     imei:(NSString *)imei
                withBlock:(void(^)(NSDictionary *result))success;

/**
 *  获取货单详细信息
 *
 *  @param orgId    orgId
 *  @param userId   userId
 *  @param userType userType
 *  @param imei     imei
 *  @param success  成功回调
 */
+ (void)getOrderDetail:(NSNumber *)orderId
                userId:(NSNumber *)userId
              userType:(NSString *)userType
                  imei:(NSString *)imei
             withBlock:(void(^)(NSDictionary *result))success;


/**
 *  获取司机告警次数信息
 *
 *  @param driverId 司机id
 *  @param userId   用户id
 *  @param imei     设备号
 *  @param success  成功回调
 */
+ (void)getDriverAlarmTimes:(NSNumber *)driverId
                     userId:(NSNumber *)userId
                       imei:(NSString *)imei
                  withBlock:(void(^)(NSDictionary *result))success;

@end